home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 6 / ads / s-tasinf < prev    next >
Text File  |  1996-02-12  |  5KB  |  96 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                     S Y S T E M . T A S K _ I N F O                      --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                           (Compiler Interface)                           --
  9. --                                                                          --
  10. --                            $Revision: 1.2 $                              --
  11. --                                                                          --
  12. --     Copyright (C) 1992,1993,1994,1995 Free Software Foundation, Inc.     --
  13. --                                                                          --
  14. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  15. -- terms of the  GNU General Public License as published  by the Free Soft- --
  16. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  17. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  18. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  19. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  20. -- for  more details.  You should have  received  a copy of the GNU General --
  21. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  22. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  23. -- MA 02111-1307, USA.                                                      --
  24. --                                                                          --
  25. -- As a special exception,  if other files  instantiate  generics from this --
  26. -- unit, or you link  this unit with other files  to produce an executable, --
  27. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  28. -- covered  by the  GNU  General  Public  License.  This exception does not --
  29. -- however invalidate  any other reasons why  the executable file  might be --
  30. -- covered by the  GNU Public License.                                      --
  31. --                                                                          --
  32. -- GNAT was originally developed  by the GNAT team at  New York University. --
  33. -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
  34. --                                                                          --
  35. ------------------------------------------------------------------------------
  36.  
  37. --  This package contains the definitions and routines associated with the
  38. --  implementation of the Task_Info pragma. It is specialized appropriately
  39. --  for targets that make use of this pragma.
  40.  
  41. --  Note: the compiler generates direct calls to this interface, via Rtsfind.
  42. --  Any changes to this interface may require corresponding compiler changes.
  43.  
  44. package System.Task_Info is
  45. pragma Preelaborate (Task_Info);
  46.  
  47.    -----------------------------------------
  48.    -- Implementation of Task_Info Feature --
  49.    -----------------------------------------
  50.  
  51.    --  The Task_Info pragma:
  52.  
  53.    --    pragma Task_Info (EXPRESSION);
  54.  
  55.    --  allows the specification on a task by task basis of a value of type
  56.    --  System.Task_Info.Task_Info_Type to be passed to a task when it is
  57.    --  created. The specification of this type, and the effect on the task
  58.    --  that is created is target dependent.
  59.  
  60.    --  The Task_Info pragma appears within a task definition (compare the
  61.    --  definition and implementation of pragma Priority). If no such pragma
  62.    --  appears, then the value Task_Info_Unspecified is passed. If a pragma
  63.    --  is present, then it supplies an alternative value. If the argument of
  64.    --  the pragma is a discriminant reference, then the value can be set on
  65.    --  a task by task basis by supplying the appropriate discriminant value.
  66.  
  67.    --  Note that this means that the type used for Task_Info_Type must be
  68.    --  suitable for use as a discriminant (i.e. a scalar or access type).
  69.  
  70.    ------------------
  71.    -- Declarations --
  72.    ------------------
  73.  
  74.    --  In this dummy version, we use the type Boolean, and the default is
  75.    --  False. These definitions would in fact allow the limited use of the
  76.    --  Task_Info pragma with argument True or False, but since the default
  77.    --  implementation of the task create procedure ignores the Task_Info
  78.    --  parameter, there would be no effect.
  79.  
  80.    type Task_Info_Type is new Boolean;
  81.    --  Type used for passing information to task create call, using the
  82.    --  Task_Info pragma. This type may be specialized for individual
  83.    --  implementations, but it must be a type that can be used as a
  84.    --  discriminant (i.e. a scalar or access type).
  85.  
  86.    Unspecified_Task_Info : constant Task_Info_Type := False;
  87.    --  Value passed to task in the absence of a Task_Info pragma
  88.  
  89.    -----------------
  90.    -- Subprograms --
  91.    -----------------
  92.  
  93.    --  Hooks go here ???
  94.  
  95. end System.Task_Info;
  96.